package com.wd.service.impl;

import com.wd.dao.UserDao;
import com.wd.dao.impl.UserDaoImpl;
import com.wd.entity.User;
import com.wd.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {

    UserDao userDao=new UserDaoImpl();

    @Override
    public List<User> selAllUser() throws Exception {
        return userDao.selAllUser();
    }

    @Override
    public int selUserByAccount(String account) throws Exception {
        return userDao.selUserByAccount(account);
    }

    @Override
    public User Login(String account, String password) throws Exception {
        return userDao.Login(account,password);
    }

    @Override
    public int register(User user) throws Exception {
        return userDao.register(user);
    }

    @Override
    public int delUser(int id) throws Exception {
        return userDao.delUser(id);
    }

    @Override
    public User findPassword(User user) throws Exception {
        return userDao.findPassword(user);
    }

    @Override
    public String findProblem(String account) throws Exception {
        return userDao.findProblem(account);
    }

    @Override
    public int updUser(User user) throws Exception {
        return userDao.updUser(user);
    }

    @Override
    public int updPassword(String account, String password, String newPassword) throws Exception {
        return userDao.updPassword(account,password,newPassword);
    }

    @Override
    public User selUserById(int id) throws Exception {
        return userDao.selUserById(id);
    }

    @Override
    public int countUser() throws Exception {
        return userDao.countUser();
    }


}
